package holdObject;

public class StackTest {

	public static void main(String[] args) {

		Stack<String> stack = new Stack<>();
		for (String string : "My dog has fieas".split(" ")) {
			stack.push(string);
		}
		
		while(!stack.empty()){
			System.out.print(stack.pop()+" ");
		}
	}

}
